<!doctype html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<meta charset="UTF-8">
<title>Title</title>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <meta name="format-detection" content="telephone=no">
    <title>夏日速递</title>
<!--&lt;!&ndash;    datatable not a function&ndash;&gt;加载Jquery-->
    <!-- jQuery -->
    <script src="  js/external/jquery-3.4.1.min.js" type="text/javascript" charset="utf-8"></script>
    <!-- DataTables -->
    <link rel="stylesheet" type="text/css" href="  css/external/dataTables.bootstrap.css"/>
    <script src="  js/external/jquery.dataTables.min.js" type="text/javascript" charset="utf-8"></script>
    <script src="  js/external/dataTables.bootstrap.js" type="text/javascript" charset="utf-8"></script>
    <!--界面库 bootstrap-->
    <link rel="stylesheet" type="text/css" href="  css/external/bootstrap.min.css"/>
    <script src="  js/external/bootstrap.min.js" type="text/javascript" charset="utf-8"></script>


    <script>
        //this.$body
        // window.onload = refreshOrderData;
        // function Login(){
        //
        // }
        $(function() {
            $(".meun-item").click(function() {
                $(".meun-item").removeClass("meun-item-active");
                $(this).addClass("meun-item-active");
                var itmeObj = $(".meun-item").find("img");
                itmeObj.each(function() {
                    var items = $(this).attr("src");
                    items = items.replace("_grey.png", ".png");
                    items = items.replace(".png", "_grey.png")
                    $(this).attr("src", items);
                });
                var attrObj = $(this).find("img").attr("src");
                ;
                attrObj = attrObj.replace("_grey.png", ".png");
                $(this).find("img").attr("src", attrObj);
            });
            $("#topAD").click(function() {
                $("#topA").toggleClass(" glyphicon-triangle-right");
                $("#topA").toggleClass(" glyphicon-triangle-bottom");
            });
            $("#topBD").click(function() {
                $("#topB").toggleClass(" glyphicon-triangle-right");
                $("#topB").toggleClass(" glyphicon-triangle-bottom");
            });
            $("#topCD").click(function() {
                $("#topC").toggleClass(" glyphicon-triangle-right");
                $("#topC").toggleClass(" glyphicon-triangle-bottom");
            });
            $(".toggle-btn").click(function() {
                $("#leftMeun").toggleClass("show");
                $("#rightContent").toggleClass("pd0px");
            })
        })
    </script>
    <!--[if lt IE 9]>
    <script src="js/html5shiv.min.js"></script>
    <script src="js/respond.min.js"></script>
    <![endif]-->
    <link href="css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" type="text/css" href="css/common.css" />
    <link rel="stylesheet" type="text/css" href="css/slide.css" />
    <link rel="stylesheet" type="text/css" href="css/bootstrap.min.css" />
    <link rel="stylesheet" type="text/css" href="css/flat-ui.min.css" />
    <link rel="stylesheet" type="text/css" href="css/jquery.nouislider.css">
</head>



<body>
<div id="wrap">
    <!-- 左侧菜单栏目块 -->
    <div class="leftMeun" id="leftMeun" th:fragment="side">
        <!--界面管理员姓名和头像显示区域-->
        <div id="logoDiv">
            <p id="logoP">
                <img id="topAdminImage" alt="用户头像" src="images/logo.png">
                <span id="topAdminName"></span>
            </p>
        </div>

        <!--管理员个人信息-->
        <div id="personInfor" >
            <button class="btn btn-yellow btn-xs" data-toggle="modal" data-target="#completeAdminInfo" style="margin: 2px">信息完善 </button>
            <button type="button" class="btn btn-yellow btn-xs" onclick="logout()" style="margin: 2px">退出登录</button>
        </div>

        <div class="meun-title">管理列表</div>
            <div class="meun-item" href="#user" onclick="getUserData()" aria-controls="user" role="tab" data-toggle="tab"><img src="images/icon_user_grey.png">用户管理</div>
            <div class="meun-item" href="#product" onclick="getProductData()" aria-controls="product" role="tab" data-toggle="tab" id="schar"><img src="images/icon_chara_grey.png">商品管理</div>
            <div class="meun-item" href="#coupon" onclick="getCouponData()" aria-controls="coupon" role="tab" data-toggle="tab"><img src="images/icon_source_grey.png">优惠券管理</div>
            <div class="meun-item" href="#order" onclick="getOrderData()"aria-controls="order" role="tab" data-toggle="tab"><img src="images/icon_source.png">订单管理</div>
            <div class="meun-item" href="#place" onclick="getPlaceData()" aria-controls="place" role="tab" data-toggle="tab"><img src="images/icon_house_grey.png">地区管理</div>
            <div class="meun-item" href="#employee" onclick="getEmployeeData()" aria-controls="employee" role="tab" data-toggle="tab"><img src="images/icon_card_grey.png">员工管理</div>
            <div class="meun-item" href="#notice" onclick="getNoticeData()" aria-controls="notice" role="tab" data-toggle="tab"><img src="images/icon_source_grey.png">公告管理</div>


        <div class="meun-title">分析列表</div>
<!--            <div class="meun-item" href="#productAnalysis" onclick="getProductAnalysisData()" aria-controls="productAnalysis" role="tab" data-toggle="tab"><img src="images/icon_char_grey.png">商品分析</div>-->
<!--            <div class="meun-item" href="#userAnalysis" onclick="getUserAnalysisData()" aria-controls="userAnalysis" role="tab" data-toggle="tab"><img src="images/icon_char_grey.png">用户分析</div>-->
            <div class="meun-item" href="#moneyAnalysis" onclick="getMoneyAnalysisData()" aria-controls="moneyAnalysis" role="tab" data-toggle="tab"><img src="images/icon_char_grey.png">经济分析</div>
<!--            <div class="meun-item" href="#employeeAnalysis" onclick="getEmployeeAnalysisData()" aria-controls="employeeAnalysis" role="tab" data-toggle="tab"><img src="images/icon_char_grey.png">员工分析</div>-->
            <div class="meun-item" href="#reviewAnalysis" onclick="getReviewAnalysisData()" aria-controls="reviewAnalysis" role="tab" data-toggle="tab"><img src="images/icon_char_grey.png">评价分析</div>


        <div class="meun-title">工具列表</div>
            <div class="meun-item" href="#changePassword" aria-controls="changePassword" role="tab" data-toggle="tab"><img src="images/icon_change_grey.png">密码修改</div>
            <div class="meun-item" href="#memo" onclick="getMemoData()" aria-controls="memo" role="tab" data-toggle="tab"><img src="images/icon_source_grey.png">备忘录</div>
    </div>







    <!-- 右侧具体内容栏目 -->
    <div id="rightContent">
        <a class="toggle-btn" id="nimei">
            <i class="glyphicon glyphicon-align-justify"></i>
        </a>
        <!-- Tab panes -->
        <div class="tab-content">

            <!--完善管理员信息隐藏窗口-->
            <div class="modal fade" id="completeAdminInfo" role="dialog" aria-labelledby="gridSystemModalLabel">
                <div class="modal-dialog" role="document">
                    <div class="modal-content">
                        <div class="modal-header">
                            <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                            <h4 class="modal-title" id="completeAdminInfoModal">完善个人信息</h4>
                        </div>
                        <div class="modal-body">
                            <div class="container-fluid">
                                <form class="form-horizontal">
                                    <div class="form-group">
                                        <label for="AdminName" class="col-xs-3 control-label">姓名：</label>
                                        <div class="col-xs-6 input-sm">
                                            <input type="text" class="form-control input-sm duiqi" id="AdminName" placeholder="姓名">
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label for="AdminEmail" class="col-xs-3 control-label">邮箱：</label>
                                        <div class="col-xs-6 input-sm">
                                            <input type="email" class="form-control input-sm duiqi" id="AdminEmail" placeholder="邮箱">
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label for="AdminImage" class="col-xs-3 control-label">上传头像：</label>
                                        <div class="col-xs-6 input-sm duiqi">
                                            <!--                                <input type='file' id="AdminImage" name='AdminImage' onchange="change(this)">-->
                                            <input type='file' id="AdminImage" name='AdminImage' onchange="showImg(this)">
                                        </div>
                                        <div class="col-xs-6  ">
                                            <label>头像预览</label>
                                            <img  id="adminImageShow" src="images/logo.png" width="100" height="100" style="width: 100px;height: 100px;background-color: #00a7d0;margin: 0 auto">
                                        </div>
                                    </div>
                                </form>
                            </div>
                        </div>
                        <div class="modal-footer">
                            <button type="button" class="btn btn-xs btn-white" data-dismiss="modal">取 消</button>
                            <button type="submit" class="btn btn-xs btn-green" onclick="completeAdminInfo()">保 存</button>
                        </div>
                    </div>
                </div>
            </div>

            <!--用户管理模块-->
            <div role="tabpanel" class="tab-pane active" id="user" th:fragment="cha">
<!--                用户检索-->
                <div class="check-div form-inline">
                    <div class="col-xs-10">
                        <input type="text" id="searchUserId" class="form-control input-sm" placeholder="编号">
                        <input type="text" id="searchUserName" class="form-control input-sm" placeholder="姓名">
                        <input type="text" id="searchUserPhone" class="form-control input-sm" placeholder="电话">
                        <input type="text" id="searchUserSex" class="form-control input-sm" placeholder="性别">
                        <input type="text" id="searchUserLevel" class="form-control input-sm" placeholder="级别(1:会员 0:普通)">
<!--                        <input type="date" id="searchUserCreateTime" class="form-control input-sm" placeholder="创建时间">-->
                        <button onclick="refreshUserData()"   class="btn btn-white btn-xs ">查 询 </button>
                    </div>
                    <div class="col-xs-2" style=" padding-right: 40px;text-align: right;">
                        <input type="button" onclick="getUserData()" class="btn btn-white btn-xs " value="显示全部用户">
                    </div>
                </div>
<!--                用户列表-->
                <div class="data-div">
                    <div class="row tableHeader">
                        <table id="userList" class="table table-striped">
                            <thead>
                            <tr>
                                <th class="col-xs-1">编号</th>
                                <th class="col-xs-1>">姓名</th>
                                <th class="col-xs-1">电话</th>
                                <th class="col-xs-1">性别</th>
                                <th class="col-xs-1>">级别</th>
                                <th class="col-xs-1">开始时间</th>
                                <th class="col-xs-1">结束时间</th>
                                <th class="col-xs-1">获取方式</th>
                                <th class="col-xs-1>">创建时间</th>
                                <th class="col-xs-1>">操作</th>
                                <!--后续尝试通过字符串匹配将不同级别用户的行设置为不同的底色-->
                            </tr>
                            </thead>
                        </table>
                    </div>
                </div>

<!--                赠送用户VIP隐藏弹窗-->
                <div class="modal fade" id="giveUserVip" role="dialog" aria-labelledby="gridSystemModalLabel">
                    <div class="modal-dialog" role="document">
                        <div class="modal-content">
                            <div class="modal-header">
                                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                                <h4 class="modal-title" id="giveUserVipModal">赠送VIP</h4>
                            </div>
                            <div class="modal-body">
                                <div class="container-fluid">
                                    请选择赠送时间长度
                                </div>
                                <select id="sendUserVipTimeChoose">
                                    <option value="5">5天</option>
                                    <option value="10">10天</option>
                                    <option value="20">20天</option>
                                    <option value="30">30天</option>
                                </select>
                            </div>
                            <div class="modal-footer">
                                <button type="button" class="btn btn-xs btn-white" data-dismiss="modal">取 消</button>
                                <button type="button" class="btn btn-xs btn-green" onclick="giveUserVip()">确 定</button>
                            </div>
                        </div>
                    </div>
                </div>

<!--                赠送用户优惠券隐藏弹窗-->
                <div class="modal fade" id="giveUserCoupon" role="dialog" aria-labelledby="gridSystemModalLabel">
                    <div class="modal-dialog" role="document">
                        <div class="modal-content">
                            <div class="modal-header">
                                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                                <h4 class="modal-title" id="giveUserCouponModal">赠送优惠券</h4>
                            </div>

                            <div class="form-group">
                                <div>
                                    <label>用户姓名：</label>
                                    <span href="#" id="userNameInUserListCoupon"></span>
                                </div>
                            </div>

                            <div class="form-group">
                                <div>
                                    <label>优惠券：</label>
                                    <select name="selectCouponId">
                                        <option>请选择</option>
                                        <option value="1">咖啡九折券</option>
                                        <option value="2">饮品九折券</option>
                                        <option value="3">泡面九折券</option>
                                        <option value="4">咖啡五折券</option>
                                        <option value="5">泡面七折券</option>
                                    </select>
                                </div>
                            </div>

                            <div class="form-group">
                                <label>数量：</label>
                                <input type="text" class="form-control input-sm" name="giveUserCouponNumber" placeholder="数量">
                            </div>

                            <div class="modal-footer">
                                <button type="button" class="btn btn-xs btn-white" data-dismiss="modal">取 消</button>
                                <button type="button" class="btn btn-xs btn-green" id="giveUserCouponButton">保 存</button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

            <!-- 订单管理模块 -->
            <div role="tabpanel" class="tab-pane active" id="order" th:fragment="cha">

                <div class="check-div form-inline">
                    <!--订单检索-->
                    <div class="col-xs-10">
                        <input type="text" id="searchOrderId" class="form-control input-sm" placeholder="订单编号">
                        <input type="text" id="searchOrderUsername" class="form-control input-sm" placeholder="用户姓名">
                        <input type="text" id="searchOrderName" class="form-control input-sm" placeholder="配送地址">
                        <input type="text" id="searchOrderRemark" class="form-control input-sm" placeholder="备注">
                        <input type="text" id="searchOrderStatus" class="form-control input-sm" placeholder="送达状态">
                        <button onclick="getOrderData()"   class="btn btn-white btn-xs ">查 询 </button>
                    </div>
                    <div class="col-xs-2" style=" padding-right: 40px;text-align: right;">
                        <input type="button" onclick="refreshOrderData()" class="btn btn-white btn-xs " value="显示全部订单">
                    </div>
                </div>

                <!--订单列表-->
                <div class="data-div">
                    <div class="row tableHeader">
                        <table id="OrderList" class="table table-striped">
<!--                        <table id="OrderList" class="table table-bordered">-->
<!--                        <table id="OrderList" class="table table-hover">-->
<!--                        <table id="OrderList" class="table table-condensed">-->
<!--                        <table id="OrderList" class="table table-responsive">    -->
<!--                            table-striped（行之间条纹显示），table—bordered（每一行每一列之间加边框）
                                table-hover(鼠标悬停某行显示灰色），table-condensed(行内边距减小，使表格更加紧凑）
                                table-responsive(响应式表格，让表格能够水平滚动以适应小型设备，小型设备：小于768px）-->
                            <thead>
                            <tr>
                                <th class="col-xs-1">编号</th>
                                <th class="col-xs-1>">用户信息</th>
                                <th class="col-xs-1">配送员</th>
                                <th class="col-xs-1">配送地址</th>
                                <th class="col-xs-2>">商品列表</th>
                                <th class="col-xs-1>">总价(￥)</th>
                                <th class="col-xs-1>">备注</th>
                                <th class="col-xs-2>">下单时间</th>
                                <th class="col-xs-2>">更新时间</th>
                                <th class="col-xs-2>">完成时间</th>
                                <th class="col-xs-1>">状态</th>
                                <th class="col-xs-1>">评价</th>
                                <th class="col-xs-2>">评价内容</th>
                                <th class="col-xs-1>">操作</th>
<!--                                后续尝试通过字符串匹配将不同状态的订单行设置为不同的底色-->
                            </tr>
                            </thead>
                        </table>
                    </div>
                </div>


                <!--查看订单信息弹出窗口-->
                <div class="modal fade" id="showOrder" role="dialog" aria-labelledby="gridSystemModalLabel">
                    <div class="modal-dialog" role="document">
                        <div class="modal-content">
                            <div class="modal-header">
                                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                                <h4 class="modal-title" id="showOrderModal">查看订单</h4>
                            </div>
                            <div class="modal-body">
                                <div>
                                    <label>用户信息：</label>
                                    <span href="#" id="showOrderUserInfo"></span>
                                </div>
                                <div>
                                    <label>配送员：</label>
                                    <span href="#" id="showOrderEmployeeName"></span>
                                </div>
                                <div>
                                    <label>配送地址：</label>
                                    <span href="#" id="showOrderPlaceName"></span>
                                </div>
                                <div>
                                    <lable>商品列表：</lable>
                                    <span href="#" id="showOrderProductInfo"></span>
                                </div>
                                <div>
                                    <lable>备注信息：</lable>
                                    <span href="#" id="showOrderRemark"></span>
                                </div>
                                <div>
                                    <lable>评价：</lable>
                                    <span href="#" id="showOrderReview"></span>
                                </div>
                                <div>
                                    <lable>评价内容：</lable>
                                    <span href="#" id="showOrderReviewContent"></span>
                                </div>
                                <div class="form-group">
                                    <label >送达状态:</label>
                                    <span href="#" id="showOrderStatus"></span>
                                </div>
                            </div>
                            <div class="modal-footer">
                                <button type="button" class="btn btn-xs btn-white" data-dismiss="modal">退 出</button>
                            </div>
                        </div>
                    </div>
                </div>



                <!--弹出删除订单信息警告窗口-->
                <div class="modal fade" id="deleteOrder" role="dialog" aria-labelledby="gridSystemModalLabel">
                    <div class="modal-dialog" role="document">
                        <div class="modal-content">
                            <div class="modal-header">
                                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                                <h4 class="modal-title" id="deleteOrderModal">提示</h4>
                            </div>
                            <div class="modal-body">
                                <div class="container-fluid">
                                    确定要删除该条订单信息？删除后不可恢复！
                                </div>
                            </div>
                            <div class="modal-footer">
                                <button type="button" class="btn btn-xs btn-white" data-dismiss="modal">取 消</button>
                                <button type="button" class="btn btn-xs btn-danger" id="deleteOrderButton">确认删除</button>
                            </div>
                        </div>
                    </div>
                </div>

            </div>

            <!-- 商品管理模块 -->
            <div role="tabpanel" class="tab-pane" id="product" th:fragment="cha">
                <div class="check-div form-inline">
                    <div class="col-xs-2">
                        <button class="btn btn-yellow btn-xs" data-toggle="modal" onclick="addProductDialog()">上架新商品</button>
                        <form action="/product/download" class="btn btn-yellow btn-xs" method="get">
                            <button type="submit">下载商品信息</button>
                        </form>
                    </div>
                    <!--检索商品-->
                    <div class="col-md-8">
                        <input type="text" id="searchProductId" class="form-control input-sm" placeholder="编号">
                        <input type="text" id="searchProductName" class="form-control input-sm" placeholder="名称">
                        <input type="text" id="searchProductStock" class="form-control input-sm" placeholder="库存">
                        <input type="text" id="searchProductDescribe" class="form-control input-sm" placeholder="详情">
                        <button onclick="refreshProductData()"   class="btn btn-white btn-xs ">查 询 </button>
                    </div>
                    <div class="col-md-2" style=" padding-right: 40px;text-align: right;">
                        <input type="button" onclick="getProductData()" class="btn btn-white btn-xs " value="显示全部商品">
                    </div>
                </div>

                <!--商品列表-->
                <div class="data-div">
                    <div class="row tableHeader">
                        <table class="table table-striped" id="ProductList">
                            <thead>
                            <tr>
                                <th class="col-xs-1">编号</th>
                                <th class="col-xs-1">名称</th>
                                <th class="col-xs-2">详情</th>
                                <th class="col-xs-1">库存</th>
                                <th class="col-xs-1">售价（元）</th>
                                <th class="col-xs-1">进价（元）</th>
                                <th class="col-xs-1">状态</th>
                                <th class="col-xs-1">销量</th>
                                <th class="col-xs-1">创建时间</th>
                                <th class="col-xs-1">更新时间</th>
                                <th class="col-xs-1">操作</th>
                            </tr>
                            </thead>
                        </table>
                    </div>
                </div>

                <!--上传商品弹出窗口-->
                <div class="modal fade" id="addProduct" role="dialog" aria-labelledby="gridSystemModalLabel">
                    <div class="modal-dialog" role="document">
                        <div class="modal-content">
                            <div class="modal-header">
                                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                                <h4 class="modal-title" id="addProductModal">上架新商品</h4>
                            </div>
                            <div class="modal-body">
                                <div class="container-fluid">
                                    <form class="form-horizontal">

                                        <div class="form-group ">
                                            <label class="col-xs-3 control-label">名称：</label>
                                            <div class="col-xs-6 ">
                                                <input type="text" class="form-control input-sm duiqi" name="addProductName" placeholder="名称">
                                            </div>
                                        </div>

                                        <div class="form-group">
                                            <label class="col-xs-3 control-label">详情：</label>
                                            <div class="col-xs-6 ">
                                                <input type="text" class="form-control input-sm duiqi" name="addProductDescribe" placeholder="详情">
                                            </div>
                                        </div>

                                        <div class="form-group">
                                            <label class="col-xs-3 control-label">库存：</label>
                                            <div class="col-xs-6 ">
                                                <input type="text" class="form-control input-sm duiqi" name="addProductStock" placeholder="库存">
                                            </div>
                                        </div>

                                        <div class="form-group">
                                            <label class="col-xs-3 control-label">售价(元)：</label>
                                            <div class="col-xs-6 ">
                                                <input type="text" class="form-control input-sm duiqi" name="addProductSellingPrice" placeholder="售价">
                                            </div>
                                        </div>

                                        <div class="form-group">
                                            <label class="col-xs-3 control-label">进价(元)：</label>
                                            <div class="col-xs-6 ">
                                                <input type="text" class="form-control input-sm duiqi" name="addProductPurchasingPrice" placeholder="进价">
                                            </div>
                                        </div>

                                        <div class="form-group">
                                            <label class="col-xs-3 control-label">类别：</label>
                                            <div class="col-xs-6 ">
                                                <input type="text" class="form-control input-sm duiqi" name="addProductKindId" placeholder="类别">
                                            </div>
                                        </div>

                                        <div class="form-group">
                                            <label class="col-xs-3 control-label">商品图片：</label>
                                            <div class="col-xs-6 input-sm duiqi">
                                                <input type='file' id="addProductImage" name='addProductImage' onchange="showImg(this)">
                                            </div>
                                        </div>

                                    </form>
                                </div>
                            </div>
                            <div class="modal-footer">
                                <button type="button" class="btn btn-xs btn-white" data-dismiss="modal">取 消</button>
                                <button type="button" class="btn btn-xs btn-green" onclick="addProduct()">保 存</button>
                            </div>
                        </div>
                    </div>
                </div>

                <!--修改商品信息弹出窗口-->
                <div class="modal fade" id="updateProduct" role="dialog" aria-labelledby="gridSystemModalLabel">
                    <div class="modal-dialog" role="document">
                        <div class="modal-content">
                            <div class="modal-header">
                                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                                <h4 class="modal-title" id="modifyProductModal">修改商品信息：</h4>
                            </div>
                            <div class="modal-body">
                                <div class="container-fluid">
                                    <form class="form-horizontal">

                                        <div class="form-group ">
                                            <label class="col-xs-3 control-label">名称：</label>
                                            <div>
                                                <input type="text" class="form-control input-sm duiqi" name="updateProductName" placeholder="名称">
                                            </div>
                                        </div>

                                        <div class="form-group">
                                            <label class="col-xs-3 control-label">描述：</label>
                                            <div class="col-xs-6 ">
                                                <input type="text" class="form-control input-sm duiqi" name="updateProductDescribe" placeholder="描述">
                                            </div>
                                        </div>

                                        <div class="form-group">
                                            <label class="col-xs-3 control-label">库存：</label>
                                            <div class="col-xs-6">
                                                <input type="text" class="form-control input-sm duiqi" name="updateProductStock" placeholder="库存">
                                            </div>
                                        </div>

                                        <div class="form-group">
                                            <label class="col-xs-3 control-label">售价(元)：</label>
                                            <div class="col-xs-6 ">
                                                <input type="text" class="form-control input-sm duiqi" name="updateProductSellingPrice" placeholder="售价">
                                            </div>
                                        </div>

                                        <div class="form-group">
                                            <label class="col-xs-3 control-label">进价(元)：</label>
                                            <div class="col-xs-6 ">
                                                <input type="text" class="form-control input-sm duiqi" name="updateProductPurchasingPrice" placeholder="进价">
                                            </div>
                                        </div>

<!--                                        <div class="form-group">-->
<!--                                            <label class="col-xs-3 control-label">商品图片：</label>-->
<!--                                            <div class="col-xs-6 input-sm duiqi">-->
<!--                                                <input type='file' id="productImg2" name='productImg' onchange="changeImg(this)">-->
<!--                                            </div>-->
<!--                                            <div class="col-xs-6 ">-->
<!--                                                <label></label>-->
<!--                                                <img  src="#" id="updateProductImage" width="100" height="100" style="width: 100px;height: 100px;background-color: #00a7d0;margin: 0 auto">-->
<!--                                            </div>-->
<!--                                        </div>-->

                                    </form>
                                </div>
                            </div>
                            <div class="modal-footer">
                                <button type="button" class="btn btn-xs btn-white" data-dismiss="modal">取 消</button>
                                <button type="button" class="btn btn-xs btn-green" onclick="updateProductData()">保 存</button>
                            </div>
                        </div>
                    </div>
                </div>

                <!--查看商品信息弹出窗口-->
                <div class="modal fade" id="showProduct" role="dialog" aria-labelledby="gridSystemModalLabel">
                    <div class="modal-dialog" role="document">
                        <div class="modal-content">
                            <div class="modal-header">
                                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                                <h4 class="modal-title" id="showProductModal">商品信息：</h4>
                            </div>
                            <div class="modal-body">
                                <div class="container-fluid">
                                    <form class="form-horizontal">
                                        <div class="form-group ">
                                            <label class="col-xs-3 control-label">名称：</label>
                                            <span id="showProductName"></span>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-xs-3 control-label">详情：</label>
                                            <span id="showProductDescribe"></span>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-xs-3 control-label">库存：</label>
                                            <span id="showProductStock"></span>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-xs-3 control-label">售价(元)：</label>
                                            <span id="showProductSellingPrice"></span>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-xs-3 control-label">进价(元)：</label>
                                            <span id="showProductPurchasingPrice"></span>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-xs-3 control-label">状态：</label>
                                            <span id="showProductStatus"></span>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-xs-3 control-label">销量：</label>
                                            <span id="showProductSales"></span>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-xs-3 control-label">首售时间：</label>
                                            <span id="showProductCreateTime"></span>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-xs-3 control-label">更新时间：</label>
                                            <span id="showProductUpdateTime"></span>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-xs-3 control-label">商品图片：</label>
                                            <div class="col-xs-6 ">
                                                <label></label>
                                                <img  src="#" id="showProductImage" width="100" height="100" style="width: 100px;height: 100px;background-color: #00a7d0;margin: 0 auto">
                                            </div>
                                        </div>
                                    </form>
                                </div>
                            </div>
                            <div class="modal-footer">
                                <button type="button" class="btn btn-xs btn-white" data-dismiss="modal">关闭</button>
                            </div>
                        </div>
                    </div>
                </div>

                <!--上架已有商品信息弹窗-->
                <div class="modal fade" id="putAwayProduct" role="dialog" aria-labelledby="gridSystemModalLabel">
                    <div class="modal-dialog" role="document">
                        <div class="modal-content">
                            <div class="modal-header">
                                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                                <h4 class="modal-title" id="putAwayProductModal">提示</h4>
                            </div>
                            <div class="modal-body">
                                <div class="container-fluid">
                                    确定要上架该商品吗？
                                </div>
                            </div>
                            <div class="modal-footer">
                                <button type="button" class="btn btn-xs btn-white" data-dismiss="modal">取 消</button>
                                <button type="button" class="btn btn-xs btn-danger" id="putAwayProductButton">确认上架</button>
                            </div>
                        </div>
                    </div>
                </div>

                <!--下架商品隐藏弹窗-->
                <div class="modal fade" id="soldOutProduct" role="dialog" aria-labelledby="gridSystemModalLabel">
                    <div class="modal-dialog" role="document">
                        <div class="modal-content">
                            <div class="modal-header">
                                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                                <h4 class="modal-title" id="soldOutProductModal">提示</h4>
                            </div>
                            <div class="modal-body">
                                <div class="container-fluid">
                                    确定要下架该商品吗？
                                </div>
                            </div>
                            <div class="modal-footer">
                                <button type="button" class="btn btn-xs btn-white" data-dismiss="modal">取 消</button>
                                <button type="button" class="btn btn-xs btn-danger" id="soldOutProductButton">确认下架</button>
                            </div>
                        </div>
                    </div>
                </div>

            </div>

            <!--地区管理模块-->
            <div role="tabpanel" class="tab-pane" id="place" >

                <div class="check-div form-inline" >
                    <!--地址检索-->
                    <div class="col-lg-4 col-xs-5" >
                        <input type="text" id="searchPlaceName" class=" form-control input-sm " placeholder="输入地址搜索">
                        <input type="text" id="searchPlaceSex" class=" form-control input-sm " placeholder="输入性别搜索">
                        <button class="btn btn-white btn-xs " onclick="refreshPlaceData()">查 询 </button>
                    </div>
                    <div class="col-lg-3 col-lg-offset-2 col-xs-4" style=" padding-right: 40px;text-align: right;">
                        <input type="button" onclick="getPlaceData()" class="btn btn-white btn-xs " value="显示全部地址">
                    </div>
                </div>

                <!--地址列表-->
                <div class="data-div">
                    <div class="row tableHeader">
                        <table id="PlaceList" class="table table-striped">
                            <thead>
                            <tr>
                                <th class="col-xs-2">地址编号</th>
                                <th class="col-xs-2">地址名称</th>
                                <th class="col-xs-2">男/女</th>
                                <th class="col-xs-2">创建时间</th>
                                <th class="col-xs-2">更新时间</th>
                                <th class="col-xs-2">操作</th>
                            </tr>
                            </thead>
                        </table>
                    </div>
                </div>
            </div>

            <!--员工管理模块-->
            <div role="tabpanel" class="tab-pane" id="employee">
                <!--员工检索-->
                <div class="check-div form-inline">
                    <div class="col-md-8">
                        <input type="text" id="searchEmployeeName" class=" form-control input-sm" placeholder="姓名">
                        <input type="text" id="searchEmployeePhone" class=" form-control input-sm" placeholder="账号">
                        <select id="searchEmployeeStatus">
                            <option value="">请选择员工状态</option>
                            <option value="0">离职</option>
                            <option value="1">在职</option>
                            <option value="2">休息中</option>
                            <option value="3">请假中</option>
                        </select>
                        <input type="text" id="searchEmployeeSalary" class=" form-control input-sm" placeholder="薪资">
                        <input type="text" id="searchEmployeePerformance" class=" form-control input-sm" placeholder="描述">
                        <button class="btn btn-white btn-xs " onclick="refreshEmployeeData()">查 询 </button>
                    </div>

                    <div class="col-lg-1 col-lg-offset-2 col-xs-4" style=" padding-right: 40px;text-align: right;">
                        <input type="button" onclick="getEmployeeData()" class="btn btn-white btn-xs " value="显示全部员工">
                    </div>
                </div>

                <!--员工列表-->
                <div class="data-div">
                    <div class="row tableHeader">
                        <table class="table table-striped" id="EmployeeList">
                            <thead>
                            <tr>
                                <th class="col-xs-1 ">员工编号</th>
                                <th class="col-xs-1 ">姓名</th>
                                <th class="col-xs-1">电话</th>
                                <th class="col-xs-1">性别</th>
                                <th class="col-xs-1">状态</th>
                                <th class="col-xs-1">薪资</th>
                                <th class="col-xs-1">描述</th>
                                <th class="col-xs-1">创建时间</th>
                                <th class="col-xs-1">更新时间</th>
                                <th class="col-xs-1">操作</th>
                            </tr>
                            </thead>
                        </table>
                    </div>
                </div>

<!--                弹出修改员工信息弹窗-->
                <div class="modal fade" id="updateEmployee" role="dialog" aria-labelledby="gridSystemModalLabel">
                    <div class="modal-dialog" role="document">
                        <div class="modal-content">
                            <div class="modal-header">
                                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                                <h4 class="modal-title" id="modifyEmployeeModal">修改员工信息：</h4>
                            </div>
                            <div class="modal-body">
                                <div class="container-fluid">
                                    <form class="form-horizontal">

                                        <div class="form-group ">
                                            <label class="col-xs-3 control-label">姓名: </label>
                                            <span id="EmployeeName"></span>
                                        </div>

                                        <div class="form-group">
                                            <label class="col-xs-3 control-label">描述: </label>
                                            <div class="col-xs-6">
                                                <input type="text" class="form-control input-sm duiqi" id="updateEmployeePerformance" placeholder="描述">
                                            </div>
                                        </div>

                                        <div class="form-group">
                                            <label class="col-xs-3 control-label">薪资: </label>
                                            <div class="col-xs-6">
                                                <input type="text" class="form-control input-sm duiqi" id="updateEmployeeSalary" placeholder="薪资">
                                            </div>
                                        </div>

                                        <div class="form-group">
                                            <label class="col-xs-3 control-label">状态: </label>
                                            <div class="col-xs-6">
                                                <select id="updateEmployeeStatus">
                                                    <option value="0">离职</option>
                                                    <option value="1">在职</option>
                                                    <option value="2">休息中</option>
                                                    <option value="3">请假中</option>
                                                </select>
                                            </div>
                                        </div>

                                    </form>
                                </div>
                            </div>
                            <div class="modal-footer">
                                <button type="button" class="btn btn-xs btn-white" data-dismiss="modal">取 消</button>
                                <button type="button" class="btn btn-xs btn-green" onclick="updateEmployee()">保 存</button>
                            </div>
                        </div>
                        <!-- /.modal-content -->
                    </div>
                    <!-- /.modal-dialog -->
                </div>

            </div>

            <!--优惠券管理模块-->
            <div role="tabpanel" class="tab-pane" id="coupon">

<!--                检索优惠券-->
                <div class="check-div form-inline" >
                    <div class="col-xs-3">
                        <button class="btn btn-yellow btn-xs" data-toggle="modal" onclick="addCouponDialog()">添加优惠券</button>
                    </div>
                    <div class="col-lg-4 col-xs-5" >
<!--                        <input type="text" id="searchCouponId" class=" form-control input-sm " placeholder="输入编号搜索">-->
                        <input type="text" id="searchCouponName" class=" form-control input-sm " placeholder="输入名称搜索">
                        <input type="text" id="searchCouponContent" class=" form-control input-sm " placeholder="输入内容搜索">
                        <button class="btn btn-white btn-xs " onclick="refreshCouponData()">查 询 </button>
                    </div>
                    <div class="col-lg-3 col-lg-offset-2 col-xs-4" style=" padding-right: 40px;text-align: right;">
                        <input type="button" onclick="getCouponData()" class="btn btn-white btn-xs " value="显示全部优惠券">
                    </div>
                </div>

                <!--优惠券列表-->
                <div class="data-div">
                    <div class="row tableHeader">
                        <table id="CouponList" class="table table-striped">
                            <thead>
                            <tr>
                                <th class="col-xs-1">编号</th>
                                <th class="col-xs-1">名称</th>
                                <th class="col-xs-1">详情</th>
                                <th class="col-xs-1">折扣</th>
                                <th class="col-xs-1">状态</th>
                                <th class="col-xs-1">开始时间</th>
                                <th class="col-xs-1">结束时间</th>
                                <th class="col-xs-1">创建时间</th>
                                <th class="col-xs-1">更新时间</th>
                                <th class="col-xs-1">操作</th>
                            </tr>
                            </thead>
                        </table>
                    </div>
                </div>

                <!--添加优惠券隐藏窗口-->

            </div>

            <!--公告管理模块-->
            <div role="tabpanel" class="tab-pane" id="notice"></div>




            <!--商品分析模块-->
            <div role="tabpanel" class="tab-pane" id="productAnalysis"></div>

            <!--评价分析模块-->
            <div role="tabpanel" class="tab-pane" id="reviewAnalysis"></div>

            <!--用户分析模块-->
            <div role="tabpanel" class="tab-pane" id="userAnalysis"></div>

            <!--员工分析模块-->
            <div role="tabpanel" class="tab-pane" id="employeeAnalysis"></div>

            <!--经济分析模块-->
            <div role="tabpanel" class="tab-pane" id="moneyAnalysis"></div>





            <!--备忘录模块-->
            <div role="tabpanel" class="tab-pane" id="memo"></div>

            <!-- 修改密码模块 -->
            <div role="tabpanel" class="tab-pane" id="changePassword">
                <div class="check-div">
                </div>
                <div style="padding: 50px 0;margin-top: 50px;background-color: #fff; text-align: right;width: 420px;margin: 50px auto;">
                    <form class="form-horizontal" action="/modify">

                        <div class="form-group">
                            <label class="col-xs-4 control-label">账号：</label>
                            <div class="col-xs-5">
                                <input  type="text" name="ipsw" onblur="updateAdminInfo()"  class="form-control   input-sm duiqi" id="phone" placeholder="" style="margin-top: 7px;">
                                <div class="col-xs-9"><span id="info1"  ></span></div>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-xs-4 control-label">原密码：</label>
                            <div class="col-xs-5">
                                <input  type="password" id="oldPassword"   class="form-control   input-sm duiqi"  placeholder="" style="margin-top: 7px;">
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-xs-4 control-label">新密码：</label>
                            <div class="col-xs-5">
                                <input type="password" name="psw" id="newPassword"  class="form-control input-sm duiqi"  placeholder="" style="margin-top: 7px;">
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-xs-4 control-label">确认密码：</label>
                            <div class="col-xs-5">
                                <input type="password" name="repsw" class="form-control input-sm duiqi" id="checkPassword" placeholder="" style="margin-top: 7px;">
                            </div>
                        </div>

                        <div class="form-group text-right">
                            <div class="col-xs-offset-4 col-xs-5" style="margin-left: 169px;">
                                <button type="reset" class="btn btn-xs btn-white">取 消</button>
                                <button type="button" class="btn btn-xs btn-green" onclick="updateAdminPassword()">保存</button>
                            </div>
                        </div>

                    </form>
                </div>

            </div>



            </div>
        </div>
    </div>
</div>



<!--获取管理员姓名和头像显示在界面上-->
<script type="text/javascript">
    window.onload=function (){
        var user="user";
        $.ajax({
            url:"/getAdminImage",
            data:{"name":user},
            success:function (data)
            {
                document.getElementById("topAdminImage").src=data.toString();
                // $("#topAdminImage").html(data);
            }
        })
        $.ajax({
            url:"/getAdminName",
            data:{"name":user},
            success:function (data) {
                $("#topAdminName").html(data);
            }
        })
    }

</script>



<script src="js/jquery.nouislider.js"></script>
<!-- this page specific inline scripts -->
<!--用户-->
<script src="js/function/user.js"></script>
<!--地区-->
<script src="js/function/place.js"></script>
<!--订单-->
<script src="js/function/order.js"></script>
<!--商品-->
<script src="js/function/product.js"></script>
<!--员工-->
<script src="js/function/employee.js"></script>
<!--优惠券-->
    <script src="js/function/coupon.js"></script>
<!--公告-->
    <script src="js/function/notice.js"></script>
<!--备忘录-->
    <script src="js/function/memo.js"></script>
<!--管理员-->
    <script src="js/function/admin.js"></script>


<script>
    //min/max slider
    function huadong(my, unit, def, max) {
        $(my).noUiSlider({
            range: [0, max],
            start: [def],
            handles: 1,
            connect: 'upper',
            slide: function() {
                var val = Math.floor($(this).val());
                $(this).find(".noUi-handle").text(
                    val + unit
                );
                console.log($(this).find(".noUi-handle").parent().parent().html());
            },
            set: function() {
                var val = Math.floor($(this).val());
                $(this).find(".noUi-handle").text(
                    val + unit
                );
            }
        });
        $(my).val(def, true);
    }
    huadong('.slider-minmax1', "分钟", "5", 30);
    huadong('.slider-minmax2', "分钟", "6", 15);
    huadong('.slider-minmax3', "分钟", "10", 60);
    huadong('.slider-minmax4', "次", "2", 10);
    huadong('.slider-minmax5', "天", "3", 7);
    huadong('.slider-minmax6', "天", "8", 10);
</script>
</body>

</html>